package com.tuanbiao.ui.setting;

import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatCheckBox;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.hzjq.data.entity.BlastServiceBean;
import com.tuanbiao.R;

/**
 * @author abiao
 * @since 2022/5/12 10:04
 */
public class SettingServiceAdapter extends BaseQuickAdapter<BlastServiceBean, BaseViewHolder> {
    public SettingServiceAdapter() {
        super(R.layout.item_setting_service);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, BlastServiceBean blastServiceBean) {
        holder.setText(R.id.tv_name, blastServiceBean.getServiceName());
        AppCompatCheckBox select = holder.getView(R.id.cb_select);
        select.setChecked(blastServiceBean.isSelect());
        AppCompatCheckBox debug = holder.getView(R.id.cb_is_debug);
        debug.setChecked(blastServiceBean.isDebug());
    }
}
